package com.zhongxi.guoyuan.entity.seller;

import org.json.JSONArray;
import org.json.JSONObject;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2016/12/20.
 */

public class ComplaintData{
    private String orderid;
    private String userid;
    private String content;
    private String ctime;

    public String getOrderid() {
        return orderid;
    }

    public void setOrderid(String orderid) {
        this.orderid = orderid;
    }

    public String getUserid() {
        return userid;
    }

    public void setUserid(String userid) {
        this.userid = userid;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getCtime() {
        return ctime;
    }

    public void setCtime(String ctime) {
        this.ctime = ctime;
    }

    public static List<ComplaintData> parseMatch(JSONArray ary) {
        List<ComplaintData> list = new ArrayList<ComplaintData>();
        try{
            ComplaintData info;
            for(int i=0;i<ary.length();i++){
                info = new ComplaintData();
                JSONObject obj = ary.getJSONObject(i);
                info.setUserid(obj.getString("userid"));
                info.setOrderid(obj.getString("orderid"));
                info.setContent(obj.getString("content"));
                info.setCtime(obj.getString("ctime"));
                list.add(info);
            }
        }catch (Exception e){
            e.printStackTrace();
        }
        return list;
    }
}
